/*
 * @Author: Seon.Hu SeonHu@126.com
 * @Date: 2023-06-16 15:13:38
 * @LastEditors: Seon.Hu SeonHu@126.com
 * @LastEditTime: 2024-03-10 15:31:06
 * @FilePath: \bg-vben\src\views\system\loginlog\loginlog.data.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { AdColumn } from '@/components/AdVxeTable';
import { useI18n } from '@/hooks/web/useI18n';

const { t } = useI18n();

export const columns: AdColumn[] = [
  {
    title: t('entity.idTitle'),
    field: 'Id',
    width: 180,
    visible: false,
    formVisible: true,
    formEditable: false,
    filterable: true,
    dataType: 'integer',
  },
  {
    title: t('routes.system.loginlog.ipTitle'),
    field: 'Ip',
    width: 150,
    formVisible: true,
    formEditable: false,
    filterable: true,
    dataType: 'string',
  },
  {
    title: t('routes.system.loginlog.userAgentTitle'),
    field: 'UserAgent',
    // width: 400,
    minWidth: 200,
    formVisible: true,
    formEditable: false,
    filterable: true,
    dataType: 'text',
  },
  {
    title: t('routes.system.loginlog.logoutTimeTitle'),
    field: 'LogoutTime',
    width: 180,
    formVisible: true,
    formEditable: false,
    filterable: true,
    dataType: 'datetime',
  },
  {
    title: t('entity.creationAudited.createdTimeTitle'),
    field: 'CreatedTime',
    width: 180,
    formVisible: true,
    formEditable: false,
    filterable: true,
    dataType: 'datetime',
  },
  {
    title: t('routes.system.loginlog.userIdTitle'),
    field: 'UserId',
    width: 150,
    formVisible: true,
    formEditable: false,
    filterable: true,
    dataType: 'integer',
  },
  {
    title: t('routes.system.loginlog.userNameTitle'),
    field: 'UserName',
    width: 100,
    formVisible: true,
    formEditable: false,
    filterable: true,
    filterIndex: 'User.UserName',
    dataType: 'string',
  },
  {
    title: t('routes.system.loginlog.nickNameTitle'),
    field: 'UserNickname',
    width: 150,
    formVisible: true,
    formEditable: false,
    filterable: true,
    filterIndex: 'User.NickName',
    dataType: 'string',
  },
];
